<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
{admintemplate header}
<div class="box">
	<div class="heading">
	<h1>用户组</h1>
	<div class="buttons">
	<a href="{url admin.php?m=usergroup&f=add}" >添加用户组</a>
	</div>
	</div>
	<div class="main">
		<form name="update" method="post" action="{url admin.php?m=usergroup}">
		<input type="hidden" id="f" name="f" />
			<table class="list" cellspacing="0" id="list">
			<thead>
				<tr>
					<td width="50" class="center">选择</td>
					<td width="50">组ID</td>
					<td width="200">组名</td>
					<td width="200" class="center">类型</td>
					<td width="100" class="center">用户数量</td>
					<td width="100" class="center">操作</td>
				</tr>
			</thead>
			<tbody>	
				{loop $result $row}
				<tr id="row_{$row['gid']}">
					<td class="center"><input type="checkbox" name="id[]" value="{$row['gid']}" {if $row['type'] == 'system'}disabled="disabled"{/if} class="checkbox" /></td>
					<td class="center">{$row['gid']}</td>
					<td width="100"><a href="{url admin.php?m=usergroup&f=edit&id=$row[gid]}">{$row['groupname']}</a></td>
					<td class="center">{if $row['type'] == 'system'}<span style="color:green">系统用户组</span>{else}自定义用户组{/if}</td>
					<td class="center"><a href="{url admin.php?m=user&groupid=$row[gid]}"><b style="color:green">{$row['usercount']}</b></a></td>
					<td class="center"><a href="{url admin.php?m=usergroup&f=edit&id=$row[gid]}">编辑</a></td>
				</tr>
				{/if}
				<tr>
					<td align="center"><input type="checkbox" class="checkbox" value="1" name="chkall" onclick="check_all(this)" /></td>
					<td colspan="5">全选 
					<input type="button" class="submit" onclick="do_submit('delete',this.form)" value="删除"/>
				</tr>
			</tbody>		
			</table>
		</form>
	</div>
</div>
{admintemplate footer}